// Routes
const routes = [
    {
        path: '/login', //登陆
        name: 'login',
        meta: { auth: false },
        component: (resolve) => {
            require(['__views/login/login.vue'], resolve);
        }
    }, {
        path: '/index',
        name: 'index',
        meta: { auth: true },
        component: (resolve) => {
            require(['__views/menu'], resolve);
        },

        children: [
            //项目管理>持有中项目  =>wl
            {
                path: 'invested-project',
                name: 'invested-project',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/invested-project/list'], resolve);
                }
            },
            // 项目管理>持有中项目>新建持有中 wl
            {
                path: 'invested-project-add/:itemId',
                name: 'invested-project-add',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/invested-project/add'], resolve);
                }
            },
            // 项目管理>持有中项目>持有中详情 wl
            {
                path: 'invested-project-detail/:itemId/:tabIndex',
                name: 'invested-project-detail',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/invested-project'], resolve);
                }
            },
            //项目管理>预警项目  => wl
            {
                path: 'alarm-project',
                name: 'alarm-project',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/alarm-project'], resolve);
                }
            },
            //子基金管理>拟投资基金  => lyx
            {
                path: 'pre-investment-funds-list',
                name: 'pre-investment-funds-list',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/pre-investment-funds/list'], resolve);
                }
            },
            //项目管理>拟投资项目  => lyx
            {
                path: 'pre-investment-project-list',
                name: 'pre-investment-project-list',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/pre-investment-project/list'], resolve);
                }
            },
            //项目管理>项目库  => lyx
            {
                path: 'project-library-list',
                name: 'project-library-list',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/project-library/list'], resolve);
                }
            },
            //项目管理>已退出项目 => wl
            {
                path: 'exited-project',
                name: 'exited-project',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/exited-project'], resolve);
                }
            },
            //基金储备库  =>wl
            {
                path: 'fund-reserve',
                name: 'fund-reserve',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/fund-reserve/list'], resolve);
                }
            },
            // 新建基金储备库 wl
            {
                path: 'fund-reserve-add/:itemId',
                name: 'fund-reserve-add',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/fund-reserve/add'], resolve);
                }
            },
            // 基金储备库详情 wl
            {
                path: 'fund-reserve-detail/:itemId/:tabIndex',
                name: 'fund-reserve-detail',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/fund-reserve'], resolve);
                }
            },
            // 新建 新建拟投资项目  ->lyx
            {
               path: 'pre-investment-project-add/:itemId',
               name: 'pre-investment-project-add',
               meta: { auth: true },
               component: (resolve) => {
                   require(['__views/pre-investment-project/add'], resolve);
               }
            },
            // 新建 项目库  ->lyx
            {
                path: 'project-library-add/:itemId',
                name: 'project-library-add',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/project-library/add'], resolve);
                }
             },
            //项目管理>拟投资项目详情页  => lyx
            {
                path: 'pre-investment-project/:itemId/:tabIndex',
                name: 'pre-investment-project',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/pre-investment-project'], resolve);
                }
            },
            //项目管理>项目库  => lyx
            {
                path: 'project-library/:itemId/:tabIndex',
                name: 'project-library',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/project-library'], resolve);
                }
            },
            //子基金管理>拟投资基金详情页  => lyx
            {
                path: 'pre-investment-funds/:itemId/:tabIndex/:turnInvest?',
                name: 'pre-investment-funds',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/pre-investment-funds'], resolve);
                }
            },
            //子基金管理>新建 拟投资基金  => lyx
            {
                path: 'pre-investment-funds-add/:itemId',
                name: 'pre-investment-funds-add',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/pre-investment-funds/add'], resolve);
                }
             },
            //客户管理 =》jh
            {
                path: 'client-management',
                name: 'client-management',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/client-management'], resolve);
                }
            },
            //客户管理-个人客户(添加) =》jh
            {
                path: 'client-management-add',
                name: 'client-management-add',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/client-management/add'], resolve);
                }
            },
            //客户管理(详情页) =》jh
            {
               path: 'client-management-info/:eClient_guestId',
               name: 'client-management-info',
               meta: { auth: true },
               component: (resolve) => {
                   require(['__views/client-management/info'], resolve);
               }
            },
            //客户管理>投资详情 =>jh
            {
               path: 'client-management-investment-details/:eClient_bId',
               name: 'client-management-investment-details',
               meta: { auth: true },
               component: (resolve) => {
                   require(['__views/client-management/investmentDetails'], resolve);
               }
            },
            //母基金版-客户管理 =》jh
            {
                path: 'customer-management',
                name: 'customer-management',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/customer-management'], resolve);
                }
            },
            //客户管理-个人客户(添加) =》jh
            {
                path: 'customer-management-add',
                name: 'customer-management-add',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/customer-management/add'], resolve);
                }
            },
            //母基金-客户管理-机构客户(添加) =》jh
            {
                path: 'customer-management-institution-add',
                name: 'customer-management-institution-add',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/customer-management/add/institution.vue'], resolve);
                }
            },
            //母基金-客户管理(详情页) =》jh
            {
                path: 'customer-management-info/:eClient_guestId',
                name: 'customer-management-info',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/customer-management/info'], resolve);
                }
            },
            //母基金-客户管理>投资详情 =>jh
            {
                path: 'customer-management-investment-details/:eClient_bId',
                name: 'customer-management-investment-details',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/customer-management/investmentDetails'], resolve);
                }
            },
            //基金管理>拟设立基金 =>yyf
            {
                path: 'establishing-funds-list',
                name: 'establishing-funds-list',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/establishing-funds/list'], resolve);
                }
            },
            //基金管理>拟设立基金 >详情 =>yyf
            {
                path: 'establishing-funds/:itemId/:tabIndex',
                name: 'establishing-funds',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/establishing-funds'], resolve);
                }
            },
            //基金管理>拟设立基金 >添加 =>yyf
            {
                path: 'establishing-funds-add',
                name: 'establishing-funds-add',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/establishing-funds/add'], resolve);
                }
            },

            //组合查询=>yyf
            {
                path: 'advanced-search',
                name: 'advanced-search',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/advanced-search/index'], resolve);
                }
            },

            //投资中母基金 列表页=>yyf
            {
                path: 'invested-FOF-list',
                name: 'invested-FOF-list',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/invested-FOF/list'], resolve);
                }
            },
            //新建 投资中母基金=>yyf
            {
                path: 'invested-FOF-add',
                name: 'invested-FOF-add',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/invested-FOF/add'], resolve);
                }
            },
            // 投资中母基金 详情页=>yyf
            {
                path: 'invested-FOF/:itemId/:tabIndex',
                name: 'invested-FOF',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/invested-FOF/index'], resolve);
                }
            },
            // 已退出母基金 列表页=>yyf
            {
                path: 'quit-FOF-list',
                name: 'quit-FOF-list',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/quit-FOF/list'], resolve);
                }
            },
            //基金管理>已设立基金=》yyr
            {
                path: 'investing-funds-list',
                name: 'investing-funds-list',
                meta: { auth: true},
                component: (resolve) => {
                    require(['__views/investing-funds/list'], resolve);
                }
            },
            //基金管理>已设立基金=》yyr
            {
                path: 'investing-funds-add/:establishId?',
                name: 'investing-funds-add',
                meta: { auth: true},
                component: (resolve) => {
                    require(['__views/investing-funds/add'], resolve);
                }
            },
            //基金管理>已设立基金（详情）=》yyr
            {
                path: 'investing-funds/:fundId/:tabIndex/',
                name: 'investing-funds',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/investing-funds/index.vue'], resolve);
                }
            },
            //基金管理>已到期基金=》yyr
            {
                path: 'expired-funds-list',
                name: 'expired-funds-list',
                meta: { auth: true},
                component: (resolve) => {
                    require(['__views/expired-fund/list'], resolve);
                }
            },
            //母基金>已投资基金列表>yyr
            {
                path: 'invested-funds-list',
                name: 'invested-funds-list',
                meta: { auth: true},
                component: (resolve) => {
                    require(['__views/invested-funds/list'], resolve);
                }
            },
            //母基金>已投资基金添加>yyr
            {
                path: 'invested-fund-add/:itemId/:establishId?',
                name: 'invested-fund-add',
                meta: { auth: true},
                component: (resolve) => {
                    require(['__views/invested-funds/add'], resolve);
                }
            },
            //母基金>已投资基金详情>yyr
            {
                path: 'invested-fund/:fundId/:tabIndex/:isExit?',
                name: 'invested-fund',
                meta: { auth: true},
                component: (resolve) => {
                    require(['__views/invested-funds/index'], resolve);
                }
            },
            //母基金>已到期基金详情>yyr
            {
                path: 'exit-funds-list',
                name: 'exit-funds-list',
                meta: { auth: true},
                component: (resolve) => {
                    require(['__views/exit-fund/list'], resolve);
                }
            },
            // 系统配置 - 角色管理 - 列表 =>jh
            {
                path: 'system-settings/role-manage',
                name: 'system-settings-role-manage',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/system-settings/role'], resolve);
                }
            },
            // 系统配置 - 角色创建 - jh
            {
                path: 'system-settings/role-add/:roleId',
                name: 'system-settings-role-add',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/system-settings/role/addRole'], resolve);
                }
            },
            // 系统配置 - 用户 - 列表 =>jh
            {
                path: 'system-settings/user-list/:roleId',
                name: 'system-settings-user-list',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/system-settings/user'], resolve);
                }
            },
            // 系统配置 - 用户 - 更新&创建 =>jh
            {
               path: 'system-settings/user/add/:userId',
               name: 'system-settings-user-add',
               meta: { auth: true},
               component: (resolve) => {
                   require(['__views/system-settings/user/addUser'], resolve);
               }
            },
            // 系统配置 -流程配置  =>jh
            {
                path: 'system-settings/option-setting',
                name: 'system-settings-option-setting',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/system-settings/option'], resolve);
                }
            },
            // 个人中心 zs
            {
                path: 'personal-center/:tabIndex/:tab?',
                name: 'personal-center',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/personal-center'], resolve);
                }
            },
            // 首页=>yyr
            {
                path: 'home-page',
                name: 'home-page',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/home-page'], resolve);
                }
            },
            // 报告管理-研究报告、风控报告    zhangsai
            {
                path: 'report/:id',
                name: 'report',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/report-manager'], resolve);
                }
            },
            // 报告管理-报告生成    zhangsai
            {
                path: 'report-make',
                name: 'report-make',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/report-manager/make'], resolve);
                }
            },
            // 投中报告 zhangsai
            {
                path: 'report-china-venture',
                name: 'report-china-venture',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/report-manager/report-china-venture'], resolve);
                }
            },
            //基金管理>带动基金 =>
            {
                path: 'influenced-fund-list',
                name: 'influenced-fund-list',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/influenced-fund/list'], resolve);
                }
            },
            //基金管理>带动基金（新建/编辑） =>
            {
                path: 'influenced-fund-edit/:fundId',
                name: 'influenced-fund-edit',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/influenced-fund/edit'], resolve);
                }
            },
            //基金管理>带动基金（详情） =>
            {
                path: 'influenced-fund/:fundId',
                name: 'influenced-fund',
                meta: { auth: true },
                component: (resolve) => {
                    require(['__views/influenced-fund'], resolve);
                }
            },//基金管理》=已到期
            {
                path: 'expired-fund-list',
                name: 'expired-fund-list',
                meta: { auth: true},
                component: (resolve) => {
                    require(['__views/expired-fund/list'], resolve);
                }
            },
            // 欢迎页面
            {
                path: 'welcome',
                name: 'welcome',
                meta: { auth: true},
                component: (resolve) => {
                    require(['__views/welcome/index'], resolve);
                }
            }
        ]
    }, {
        // not found handler
        path: '*',
        meta: {
            auth: false
        },
        component: (resolve) => {
            require(['__views/login/login.vue'], resolve);
        }
    }];


export default routes;
